package com.sixth.statistics.service.impl;

import com.sixth.core.entity.Registration;
import com.sixth.core.vo.R;
import com.sixth.statistics.mapper.RegistrationMapper;
import com.sixth.statistics.service.RegistrationService;
import com.sixth.statistics.vo.RegistrationVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @program: six-hospital-system
 * @description:
 * @author: 朱永奇
 * @create: 2024-08-20 08:47
 **/
@Service
public class RegistrationImpl implements RegistrationService {
    @Autowired
    private RegistrationMapper registrationMapper;
    /**
     * 医生工作量统计
     * @param registrationVo
     * @return
     */
    @Override
    public R<List<Registration>> selectAll(RegistrationVo registrationVo) {
        List<Registration> registrations = registrationMapper.selectRegList(registrationVo);
        return R.ok(registrations);
    }
    /**
     * 医生工作总数统计
     * @param registrationVo
     * @return
     */
    @Override
    public R<List<Registration>> selectById(RegistrationVo registrationVo) {
        List<Registration> registrations = registrationMapper.selectByIdReg(registrationVo);
        return R.ok(registrations);
    }

    /**
     * 挂号总收入
     * @param registrationVo
     * @return
     */
    @Override
    public R<List<Registration>> selectZSR(RegistrationVo registrationVo) {
        List<Registration> registrations = registrationMapper.selectZSR(registrationVo);
        return R.ok(registrations);
    }

    /**
     * 挂号总退费
     * @param registrationVo
     * @return
     */
    @Override
    public R<List<Registration>> selectZTF(RegistrationVo registrationVo) {
        List<Registration> registrations = registrationMapper.selectZTF(registrationVo);
        return R.ok(registrations);
    }

    /**
     * 挂号收入详情
     * @param registrationVo
     * @return
     */
    @Override
    public R<List<Registration>> selectWXSR(RegistrationVo registrationVo) {
        List<Registration> registrations = registrationMapper.selectWXSR(registrationVo);
        return R.ok(registrations);
    }

    /**
     * 挂号退费详情
     * @param registrationVo
     * @return
     */
    @Override
    public R<List<Registration>> selectWXTF(RegistrationVo registrationVo) {
        List<Registration> registrations = registrationMapper.selectWXTF(registrationVo);
        return R.ok(registrations);
    }
}
